﻿/// <reference path="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" />
/// <reference path="/knockout-2.1.0.debug.js"/>


ko.bindingHandlers.navigateTo = {
    update: function (element, valueAccessor) {
        var pageUrl = ko.utils.unwrapObservable(valueAccessor()) || 'about:blank',
            iframe = element.contentWindow || element.contentDocument;
        iframe = iframe.document ? iframe.document : iframe;
        iframe.location.replace(pageUrl)
    }
};
